import React, { useState, useEffect } from "react";
// import { useMountedState } from "react-use";
import useMountedState from "../../hooks/customs/useMountedState";

const TestUseMountedState = () => {
    const isMounted = useMountedState()
    const [,setNum ] = useState(0);

    useEffect(() => {
        setTimeout(() => {
            setNum(1);
        }, 1000);
    }, []);

    return <div>{ isMounted() ? 'mounted' : 'pending'}</div>

}

export default TestUseMountedState
